package org.ctstudio.oa.duty;

import org.ctstudio.oa.duty.config.ContextConfig;
import org.ctstudio.oa.duty.config.SecurityConfig;
import org.ctstudio.oa.duty.config.ServletConfig;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;

@EnableAutoConfiguration
@Import({ ContextConfig.class, ServletConfig.class, SecurityConfig.class })
public class Application extends SpringBootServletInitializer {

  public static void main(String[] args) {
    new SpringApplicationBuilder(Application.class).run(args);
  }

  @Override
  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    return application.sources(Application.class);
  }
}
